package nmrworkflow.framework.functionwrappers.nmrpipe;

import nmrworkflow.framework.functionwrappers.Argument;
import nmrworkflow.framework.functionwrappers.Function;

/**
 * Wraps the NMRPipe Phase Correction (PS) function
 * @author rjn
 *
 */
public class NmrPipePs extends BaseNmrPipeWrapper {
	
	private int phase0;
	private int phase1;
	private boolean dropImaginaries;
	
	public NmrPipePs(int phase0, int phase1, boolean dropImaginaries) {
		super();
		
		this.phase0 = phase0;
		this.phase1 = phase1;
		this.dropImaginaries = dropImaginaries;
	}
	

	@Override
	protected Function buildFunction() {
		Function ps = new Function("PS");
		ps.addArgument(new Argument("p0", phase0 + ""));
		
		if(dropImaginaries)
			ps.addArgument(new Argument("di", ""));
		
		return ps;
	}


	public boolean isDropImaginaries() {
		return dropImaginaries;
	}


	public void setDropImaginaries(boolean dropImaginaries) {
		this.dropImaginaries = dropImaginaries;
	}


	public int getPhase0() {
		return phase0;
	}


	public void setPhase0(int phase0) {
		this.phase0 = phase0;
	}


	public int getPhase1() {
		return phase1;
	}


	public void setPhase1(int phase1) {
		this.phase1 = phase1;
	}
	
	
}
